//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    on:false,
    btnContent:'展开',
    lists: [[{ imgurl: 'https://liuyangyang.xyz/dist/chushenguanli.png', url: 'qingjia', desc: '请假' }, { imgurl: 'https://liuyangyang.xyz/dist/sousuo.png', url: 'qingjiasearch', desc: '请假查询' }, { imgurl: 'https://liuyangyang.xyz/dist/bianji.png', url: 'jiabanshenqing', desc: '加班申请' }, { imgurl: 'https://liuyangyang.xyz/dist/yulan.png', url: 'jiabansearch', desc: '加班查询' }], [{ imgurl: 'https://liuyangyang.xyz/dist/banli.png', url: 'qiankashenqing', desc: '签卡申请' }, { imgurl: 'https://liuyangyang.xyz/dist/shuaxin.png', url: 'qiankalist', desc: '签卡查询' }, { imgurl: 'https://liuyangyang.xyz/dist/chakanxiangqing.png', url: 'xinzilist', desc: '薪资查询' }, { imgurl: 'https://liuyangyang.xyz/dist/riqi.png', url: '', desc: '月度报表' }], [ { imgurl: 'https://liuyangyang.xyz/dist/cuishouguanli.png', url: '', desc: '密码修改' }, { url: '', desc: '' }, { url: '', desc: '' },{ url: '', desc: '' }]]
  },
  onLoad: function () {

  },
  daiShenPi(){
    wx.navigateTo({
      url: '../mylist/mylist'
    })
  },
  selectgongNeng(e){
    //e.currentTarget.dataset.idx
    wx.navigateTo({
      url: '../' + e.currentTarget.dataset.url+'/' + e.currentTarget.dataset.url
    })
  },
  showBtn(){
    if(this.data.on){
      this.setData({
        on:false,
        btnContent:'收起'
      })
    }else{
      this.setData({
        on: true,
        btnContent: '展开'
      })
    }
  }
})
